//
//  MCServiceAgreementCell.swift
//  StoreManage
//
//  Created by MC on 2017/12/27.
//  Copyright © 2017年 MC. All rights reserved.
//

import UIKit

class MCServiceAgreementCell: UITableViewCell {


    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        
        self.addSubview(lineView)
        lineView.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.height.equalTo(1)
            make.top.equalTo(40)
        }
        
        self.addSubview(grayLineView)
        grayLineView.snp.remakeConstraints { (make) ->Void in
            make.left.bottom.right.equalTo(self)
            make.height.equalTo(5)
        }

        self.addSubview(titleLabel)
        titleLabel.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(15)
            make.top.equalTo(0)
            make.height.equalTo(40)
        }
        
        self.addSubview(detailLabel)
        detailLabel.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(15)
            make.right.equalTo(-15)
            make.top.equalTo(lineView.snp.bottom).offset(5)
            make.bottom.equalTo(grayLineView.snp.top).offset(-5)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    
    lazy var lineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.MCGray_light
        return view
    }()
    
    lazy var grayLineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.MCGray_light
        return view
    }()

    lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.font = MCFont(16)
        return label
    }()
    
    lazy var detailLabel: UILabel = {
        let label = UILabel()
        label.font = MCFont(14)
        label.textColor = UIColor.MCGray
        label.numberOfLines = 0
        return label
    }()

}
